package net.hn.hnms.biz.api.mine;

import net.hn.hnms.biz.api.feign.base.FeignClientsConfigurationCustom;
import net.hn.hnms.biz.api.mine.model.*;
import net.hn.hnms.biz.api.mine.model.*;
import net.hn.hnms.biz.api.mine.model.dto.MineCodeMapDto;
import net.hn.hnms.sys.common.core.constant.ServiceNameConstants;
import net.hn.hnms.sys.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * Author: PanSX
 * Date: 2022/8/5 15:25
 */
@FeignClient(contextId = "RemoteMineInfoService", value = ServiceNameConstants.MINE_BASE_SERVICE
        ,fallback =RemoteMineInfoServiceFallback.class,configuration = FeignClientsConfigurationCustom.class
)
@Component
public interface RemoteMineInfoService {
    /**
     * 煤矿基础信息
     * @return
     */
    @GetMapping("mine/info/detail")
    R<MineVo> getMineInfo(@RequestParam("mineCode") String mineCode);

    /**
     * 获取系统型号
     * @param sysName
     * @return
     */
    @GetMapping("mine/info/getSysModel")
    R<SysModelVo> getSysModel(@RequestParam("sysName") String sysName);

    /**
     * 瓦斯评分
     * @param mineCode
     * @return
     */
    @GetMapping("gas/earlyWarning/gasIndicator")
    R<GasIndicatorVo> gasIndicator(@RequestParam("mineCode")String mineCode);

    @GetMapping("dust/earlyWarning/dustIndicator")
    R<DustIndicatorVo> dustIndicator(@RequestParam("mineCode")String mineCode);

    /**
     * 发送消息
     * @param msg
     * @return
     */
    @PostMapping("mine/info/sendBaseMessage")
    R<MineVo> sendBaseMessage(@RequestBody WeChartBaseMessage msg);

    /**
     * 获取华能与龙软编码映射表
     * @return
     */
    @GetMapping("remoteMine/getMineCodeMapList")
    List<MineCodeMapDto> getMineCodeMapList(@RequestParam("mineCode") String mineCode);
}
